Computer Programing I in Visual Basic --- CS602 --- Daily Assignments

Monday - Friday 6/7-11/10
Objective:
Students will make a program that opens files and compares the contents using nested For Next loops.


Assignment:
Program: WhichGrade.frm
Include the err_handler code from making MiniEdit better in the appropriate places.
Let me know when you are ready to have the files necessary for opening and I will send them to you.
Directions in notebook.
Paper and Pencil: WhichGrade.frm Questions

Ticket out the Door:
Upload to Gaggle digital locker.


Thursday 6/3/10
Objective:
Students will make a program better by preventing crashing.


Do Now:
Paper and Pencil: Finish Sports.frm Questions
If class.txt and sports.txt are not on the desktop, drag them from the Thawspace folder Friday May 28, 2010 onto the desktop.

Assignment:
Program: Sports.frm Make It Better
Apply what you have learned by making the MiniEdit program better by including the error handler in mnuOpen in your Sports.frm program.
An additional change is that you will need move the last 2 lines of code inside of the new If Then.


Ticket out the Door:
Turn in Sports.frm Questions

Monday 6/1/10
Objective:
Students will analyze the use of nested loops and lists.


Do Now:
Practice for Final Exam on SynchronEyes
Program: Finish Sports.frm

Assignment:
Paper and Pencil: Sports.frm Questions
If class.txt and sports.txt are not on the desktop, drag them from the Thawspace folder Friday May 28, 2010 onto the desktop.

Ticket out the Door:
Tell me if you will go to the Barnstormers baseball game on Wednesday June 2nd at 5:50 pm if you are awarded a free ticket for improving your work in class.

Friday 5/28/10
Objective:
Students will use files and nested For Next loops to find common data in 2 lists.


Do Now:
If Summary.txt and WebSafety.txt are not on your desktop in the Monday May 24, 2010 folder in the Thawspace drive M for them and drag them onto the desktop.
Finish MiniEdit.frm Make it Better


Assignment:
Program: Sports.frm
If class.txt and sports.txt are not on the desktop, drag them from the Thawspace folder Friday May 28, 2010 onto the desktop.
Directions in notebook.

Ticket out the Door:
Tell me if you will go to the Barnstormers baseball game on Wednesday June 2nd at 5:50 pm if you are awarded a free ticket for improving your work in class.

Thursday 5/27/10
Objective:
Students will make the MiniEdit program better by preventing crashing with defensive programming.


Assignment:
Change MiniEdit.frm by following the Make It Better directions in the notebook.

Ticket out the Door:
Turn in MiniEdit Questions


Wednesday 5/26/10
Objective:
Students will make the MiniEdit program better by preventing crashing with defensive programming.


Assignment:
Change MiniEdit.frm by following the demonstration.

Ticket out the Door:
Turn in MiniEdit Questions


Tuesday 5/25/10
Objective:
Students will analyze a program that saves and load files.


Do Now:
If Summary.txt and WebSafety.txt are not on your desktop in the Monday May 24, 2010 folder in the Thawspace drive M for them and drag them onto the desktop.
Finish MiniEdit.frm Read and do everything on all 11 pages.


Assignment:

Paper and Pencil: MiniEdit.frm Questions

Ticket out the Door:
Turn in MiniEdit Questions

Monday 5/24/10
Objective:
Students will create a text editor that can save and load files.


Do Now:
If Summary.txt and WebSafety.txt are not on your desktop in the Monday May 24, 2010 folder in the Thawspace drive M for them and drag them onto the desktop.

Assignment:

Program: MiniEdit.frm
Read and do everything on all 11 pages.
Directions in your notebook.

Ticket out the Door:
Turn in back work to Miss Hangen.

Friday 5/21/10
Objective:
Students will include a bad data Do While Loop in the Calculator program.


Do Now:
Finish Questions on TestScores.frm

Assignment:

Program: Calculator.frm
Change your existing program to include Do While Loops to catch bad data.
Directions in your notebook.

Ticket out the Door:
Turn in Questions on TestScores.frm

Thursday 5/20/10
Objective:
Students will analyze a program that uses a Do While Loop to catch bad data when data is being entered through an InputBox.


Do Now:
Finish TestScores.frm

Assignment:

Paper and Pencil: Questions on TestScores.frm

Ticket out the Door:
Turn in Questions on TestScores.frm


Wednesday 5/19/10
Objective:
Students will use a Do While Loop to catch bad data.


Do Now:
Read the description of the Indefinite Average Problem on the top of page 1 of the directions for TestScores.fr
Paper and Pencil:
1. Will the data from the user be gotten through a textbox or an inputbox?
2. Will the test scores be displayed as output in a label or a listbox?
3. Must the user specify how many scores they are entering at the beginning? Yes No
4. To repeatedly get test scores the program will use which of these structures: For Next loop or Do While Loop?
5. The user will have the ability to correct invalid data because a loop will be used to continually ask for the correct data until it is provided. True False
6. Is the loop for checking for invalid data the outer loop or the inner loop of a set of nested loops?
7. How will the user indicate that there are no more scores to enter?
8. What range of numbers are valid test scores?
9. The label above the average output label will change from Current Average to what, after the last score has been entered and processed?


Assignment:

Program: TestScores.frm

Ticket out the Door:
Paper and Pencil:
See page 2 of the directions for TestScores.frm.
10. What is a 2-word general description of what these 5 lines of code do?
lblAverageTitle = "Current Average"
lblAverage = ""
Finish = False
Count = 0
Total = 0


Monday 5/17/10
Objective:
Students will use a Do While Loop.


Do Now:
Read page 1 of the DoWhileRandom.frm directions.
Discuss the difference between a Do While Loop and a For Next loop with another student.
Paper and Pencil: Explain how a Do While Loop is different than a For Next loop.


Assignment:

Program: DoWhileRandom.frm

Ticket out the Door:
Paper and Pencil: Describe another circumstance in which you think you could use a Do While Loop.


Thursday & Friday 5/13,14/10
Objective:
Students will use an input box and For Next loop to write a program to calculate grades. .


Assignment:
Program: Grades.frm
Paper and Pencil: Grades.frm Questions

Wednesday 5/12/10
Objective:
Students will use an input box and For Next loop to write a program to calculate grades. .


Assignment:
Program: Grades.frm


Tuesday 5/11/10
Objective:
Students will use an input box and nested For Next loops.


Assignment:
Finish back work:
- Random For Loop Homework
- Program Evaluation Checklist for Factorial.frm Nested.frm
- Nested Questions
- Pythag.frm
- Calculator.frm


Monday 5/10/10
Objective:
Students will use an input box.


Assignment:
Program: Calculator.frm
Finish back work.

Friday 5/7/10
Objective:
Students will work with nested For Next loops to create a program to output Pythagorean Triples.


Do Now:
Paper and Pencil:
The Pythagorean Theorem states that in a right triangle the sum of the squares of the legs is equal to the square of the hypotenuse. Pythagorean Triples are sets of whole numbers that can be the lengths of sides of right triangles.

1. Which side of a right triangle is the longest?

Which of these sets are Pythagorean Triples?

Example: 1, 2, 3
1^2 + 2^2 = 3^2
1 + 4 = 9
5 = 9
False
Not a right triangle -- not a Pythagorean Triple

Example: 6, 8, 10
6^2 + 8^2 = 10^2
36 + 64 = 100
100 = 100
True
Yes the lengths of sides form a right triangle, so 6, 8, 10 is a Pythagorean Triple.

Show the steps to prove whether these are Pythagorean Triples.

2. 2, 3, 4

3. 9, 12, 15


Assignment:

Paper and Pencil: Finish Nested Questions
Program: Pythag.frm

Ticket out the Door:
Turn in:
Do Now
Nested For Next Loop Questions
Random For Loop Homework
Program Evaluation Checklist for Factorial.frm



Thursday 5/6/10
Objective:
Students will work with nested For Next loops.


Do Now:
Finish Nested.frm.

Assignment:

Paper and Pencil: Nested For Next Loop Questions

Ticket out the Door:
Turn in:
Nested For Next Loop Questions
Random For Loop Homework
Program Evaluation Checklist

Wednesday 5/5/10

Objective:
Students will work with nested For Next loops.


Do Now:
Test your Factorial.frm program with the test data in the notebook, and fill out the Program Evaluation Checklist.

Assignment:

Program: Nested.frm
Directions in the notebook.

Ticket out the Door:
Turn in:
Random For Loop Homework
Program Evaluation Checklist





Tuesday 5/4/10
Objective:
Students will self-evaluate Factorial.frm.


Do Now:

Given the following declarations, write a the 5 lines of code needed to generate and output the factorial of a number in place of the comments in italic.

Dim Number As Integer
Dim Factorial As Double
Dim Factor As Integer
'initialize Factorial to 1
'start For loop to generate the factors from 1 to the Number
'use a similar assignment statement to accumulating a sum to calculate the factorial
'make the loop repeat
'output the factorial in a label



Assignment:
Program: Factorial.frm
Finish the program using the template provided.
Make sure you have comments with your code.
Do the self-evaluation.
Show pride in your work by making your program the best it can be!!!!!!
Self-Evaluation/Grading Rubric

external image empty.png FactorialRubric.doc


Homework:
Random For Loop Homework is due today.
external image empty.png RandomForLoopHomework.doc


Ticket out the Door:
Turn in your homework paper, Program Evaluation Checklist, Do Now, and Ticket out Door.
Paper and Pencil:
1. How do you feel about your program?
2. What do you understand better today than you did a week ago?


Thursday 4/29/10 & Monday 5/3/10

New Vocab from Word Wall: Factor, Factorial

Objective:
Students will write a program that applies the use of a For Next loop and the concept of accumulating with a variable.
Students will extrapolate from the concept of accumulating a sum to devise a new assignment statement for
generating a factorial of an unknown number.
Students will write a program to calculate factorials.


Do Now:

Monday:
Read the Factorial Do Now Answer Key with Explanations in your notebook to refresh your memory.
Discuss with you partner what progress you have made on your program and what you have yet to do.
Paper and Pencil: Write what your plans are to finish the program to make it the best it can be.

Thursday:
Do the Quiz School activity in blue below.
Make sure to view the correct answer and read the explanations after doing each question.
These tables are needed for questions 1 and 6 respectively.
Type your name in the box and start.
FactorialStudents3.PNGFactorialStudents4.PNG
Factorial! » Quiz School



Assignment:
Program: Factorial.frm
Your and your partner will take turns at the computer.
Detailed directions are in your notebook.
Include meaningful comments with your code to help other students understand what you program is doing.
Show pride in your work by making your program the best it can be!!!!!!
Self-Evaluation/Grading Rubric

external image empty.png FactorialRubric.doc


Homework:
Random For Loop Homework is due Monday.
external image empty.png RandomForLoopHomework.doc


Ticket out the Door:
Paper and Pencil: 1st day:
1. Describe one of the thinking processes you used to work on this program.
2. How far did you get?
or
2. What do you feel confident about?
or
2. What are you struggling with?

Paper and Pencil: 2nd day:
1. How do you feel about your program?
2. What do you understand better today than you did a week ago?



Wednesday 4/28/10
Objective:
Students will dissect a program that uses a For loop and Mod to find prime numbers.


Do Now:
Matching: Think it over by yourself. Then make sure everyone in your row is in agreement and understands it, so that whoever I call on to explain it will be able to.
CountSumForMatching.PNG

Finish Prime.frm

Assignment:

Paper and Pencil: Prime.frm Questions

Ticket out the Door:
Paper and Pencil: Random For Loop Homework (due Friday)

Tuesday 4/27/10
Objective:
Students will use the counter assignment statement.


Do Now:



Paper and Pencil:
1. What do you know about what prime numbers are?
2. Name a programming structure you think you could use in a Visual Basic program that determines which numbers are prime.
3. Give a reason for why you think that structure would be useful for this task.

Assignment:

Program: Prime.frm
Directions in the black notebook.
Behind the 4 pages of directions is a single page with the code larger than it appears on page 3.

Ticket out the Door:
Upload programs to your Gaggle digital locker.
Delete from the desktop.
Empty the recycle bin.


Monday 4/26/10
Objective:
Students will use the counter assignment statement.


Do Now:
Read the Notes: Counting with a COUNTER Assignment Statement
Discuss how Count = Count + 1 works, with another student.
Paper and Pencil: Explain your understanding of the counter assignment statement.

Assignment:

Program: CountSquares.frm
You must type the comments.

Ticket out the Door:
Paper and Pencil:
Matching:
_ 1. Count = Count + 1
_ 2. Sum = Sum + Number

A. Accumulating a sum
B. Counting

3. Explain why you can use the same variable on both sides of the assignment operator (=).

Turn in your papers.


Friday 4/23/10
Objective:
Students will use exponential notation in programs.


Do Now:
Remember to type your first and last name into the name box before starting the online activity.

Did you read the explanations with the answers?

Assignment:
Program: Gravity.frm
Directions in notebook.

Ticket out the Door:
Upload programs to your Gaggle digital locker.
Delete from the desktop.
Empty the recycle bin.


Thursday 4/22/10

Do Now:
Read about scientific notation and the comparable appropriate exponential notation used on calculators and in computer programming at these 2 websites.
http://www.nyu.edu/pages/mathmol/textbook/scinot.html
http://www.purplemath.com/modules/exponent3.htm
Practice scientific notation and exponential notation with these 2 websites.
http://janus.astro.umd.edu/astro/scinote/
http://www.aaamath.com/dec71i-dec2sci.html

Assignment:
Do the following conversions on a piece of paper then test them with the ExponentialNotation.exe program in the thawspace. Write the number in all 3 notations on your paper: regular notation, scientific notation, and exponential notation.
SciNotation.PNG




ExpNotExample.PNG

ExpNot.PNG
Ticket out the Door:
Finish ResultString.frm
Turn in all paper and pencil assignments.


Wednesday 4/21/10
Objective:
Students will use For Next loops and ListBoxes to accumulate sums in programs.

Do Now:
Study this example:
ForNextSquaresExample.PNG
Paper and Pencil:



Assignment:

Program: Finish RandomList.frm
Paper and Pencil: RandomList.frm Questions
NEW PROGRAM: ResultString.frm

Ticket out the Door:
Paper and Pencil:
On your Do Now paper, explain what is happening in the ResultString.frm program.
Turn in your papers.


Tuesday 4/20/10
Objective:
Students will use For Next loops and ListBoxes to accumulate sums in programs.

Do Now:
Read the Notes: Accumulating a Sum
Refer to your directions and comments in the Accumulate.frm and RandomList.frm programs to answer these questions.

1. Define accumulate.

2. Which of these lines of code is used for accumulating a sum?
A.
Sum = Sum + Number

B.
Sum = A + B + C + D

3. Draw a picture of the ListBox tool.


Assignment:

Program: Finish RandomList.frm
Paper and Pencil: RandomList.frm Questions

Ticket out the Door:
Turn in your papers.

Monday 4/19/10
Objective:
Students will use For Next loops and ListBoxes to accumulate sums in programs.


Do Now:

What output will be produced by this code? Click here to type your answer.Loop.PNG

Assignment:
Paper and Pencil: Finish Display.frm Questions on For Next Loops packet.
Program: Finish RandomList.frm
Paper and Pencil: RandomList.frm Questions

Ticket out the Door:
On the back of your packet write 3 lines about a real programming situation in which you think a For Next loop could be used. Turn in your packet.

Thursday & Friday 4/15,16/10
Objective:
Students will use For Next loops and ListBoxes to accumulate sums in programs.


Do Now:
Think-Pair-Share:
Read Notes: Accumulating a Sum in your black notebook.
Discuss what you read with another student.
Look at the pictures below and answer the questions on the form.

Tell which of these pictures is a more accurate depiction of accumulating a sum.

AccumulateSumA.PNG
AccumulateSumB.PNG

Assignment:

Program for Thursday: Accumulate.frm The directions are in the notebook on the page after the notes.
Program for Friday: RandomList.frmListBox.PNG The directions are in the notebook.


You will be using a new object called a ListBox. The format for the name of a ListBox is a word that represents what it will hold followed by the word List, so in the Accumulate.frm program your ListBox will have its name property changed to SumList, and in the RandomList.frm program your ListBox will have its name property changed to RandomList.

Ticket out Door: Include the comments in the code of the program and upload it to your Gaggle digital locker.












Ticket out the Door:
Upload programs to your Gaggle digital locker.
Delete from the desktop.
Empty the recycle bin.


Wednesday 4/14/10
Objective:
Trace code containing For Next loops.

Assignment:
Paper and Pencil:
Display.frm Questions on For Next Loops

Tuesday 4/13/10
Objective:
Trace code containing For Next loops.


Do Now:
Example:
EvenLoop.PNG

1. What will be the output for this For Next Loop?
EvenLoop-4.PNG

2. Write a For Next Loop to generate the even numbers from 4 to 140.


Assignment:

Paper and Pencil: Display.frm Questions on For Next Loops

Ticket out the Door:
Turn in papers.
Upload programs to your Gaggle digital locker.
Delete from the desktop.
Empty the recycle bin.


Monday 4/12/10
Objective:
Incorporate For Next Loops into programs for various purposes.


Do Now:
1. What will be the output for this For Next Loop?
ForNext.PNG

2. Write a For Next Loop to print the numbers from 21 to 35.




Assignment:

Display For Next Loops
Program: Display.frm

Ticket out the Door:
Turn in papers.
Upload programs to your Gaggle digital locker.
Delete from the desktop.
Empty the recycle bin.




Friday 4/9/10
Objective:
Demonstrate understanding of menu control arrays, select case, and for next loops.


Do Now:
Finish License Questions

Assignment:

Programs: Format.frm
Stock.frm


Ticket out the Door:
Turn in papers.
Upload programs to your Gaggle digital locker.
Delete from the desktop.
Empty the recycle bin.


Thursday 4/8/10
Objective:
Demonstrate understanding of menu control arrays, select case, and for next loops.


Do Now:
Finish License.frm

Assignment:

Paper and Pencil: License Questions
Discuss features in License and License Questions

Ticket out the Door:
Finish any back work.

Wednesday 4/7/10
Objective:
Demonstrate understanding of menu control arrays, select case, and for next loops.


Do Now:
Finish License.frm

Assignment:

Paper and Pencil: License Questions

Ticket out the Door:
Finish any back work.

Tuesday 4/6/10
Objective:
Use a Select Case structure to code a menu control array.


ChalkboardDoNow.PNG
Do Now:

Paper and Pencil:
Get into Microsoft Word and look at the menu items and the submenu categories.
1. Are all submenu items able to be used at any time? Yes No
2. What do submenu items look like when they are not enabled?
3. Use View -- Toolbars. What is to the left of some of the choices?
4. Under, View -- Toolbars, click on Drawing. When you choose View -- Toolbars again what happens?


Assignment:

Program: License.frm
Do not type the ...
Use the --> button to make the submenu items.

Ticket out the Door:
Paper and Pencil:
Explain what you think a menu control array is.
What programming structure can be used to do the same thing with each menu control array item? (See page 4 of the directions for License.frm.)

Thursday 4/1/10
Objective:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Do Now:
Fusce pellentesque semper purus vehicula dapibus.

Assignment:

Quisque.frm

Form here

Ticket out the Door:
Paper and Pencil:

Vivamus blandit volutpat nulla in congue. Integer aliquet orci eu justo tincidunt auctor blandit tellus mollis.


Wednesday 3/31/10
Objective:
Create a menu and use the Select Case structure in place of repeated ElseIf's.


Do Now:
Think About It:
Do multiple If Then Else structures and ElseIf 's ever confuse you?
Would you like to try a different switching structure?
The Select Case structure works with a collection of options that are based on an interger value.
Select Case cannot be used with a range of data like If Then Else and ElseIf 's.


Assignment:

Program: ClassCase.frm
Work with the partner you had for the Class.frm program to make revisions to Class.frm.
Have me check your program when you are done.

Ticket out the Door:
Paper and Pencil:
Do this with your partner and put both names on the paper.
Explain how you think the Select Case structure works.